package com.hernie.piggymall.auth;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * SpringSession核心原理
 * 1）、@EnableRedisHttpSession导入RedisHttpSessionConfiguration配置
 *      1、给容器中添加了一个组件
 *         RedisOperationsSessionRepository：Redis操作session，session的增删改查封装类
 *
 *
 *
 *  自动延期；redis中的数据也有过期时间
 */
@EnableRedisHttpSession     // 整合redis作为session存储
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class PiggymallAuthServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(PiggymallAuthServerApplication.class, args);
    }

}
